/*
 * Copyright © 2017 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

@import '../../styles/variables.scss';

$row-bg-color: #efefef;
$active-color: var(--brand-primary-color);
$disabled-color: #cccccc;
$status-code-color: #dedede;

.http-executor {
  .request-section {
    padding: 15px 10px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-gap: 8px;

    .input-path-container,
    .method-selector-container {
      display: inline-block;

      .form-control {
        border-radius: 0;
      }
    }

    .method-selector-container {
      width: 100px;
      vertical-align: top;
    }

  }

  .request-metadata {
    .metadata-header-row {
      height: 40px;
      line-height: 40px;
      font-size: 14px;
      background-color: $row-bg-color;

      .metadata-header {
        display: inline-block;
        margin-left: 20px;
        cursor: pointer;

        &.active {
          border-bottom: 2px solid $active-color;
          font-weight: bold;
        }

        &.disabled {
          color: $disabled-color;
          cursor: not-allowed;
        }
      }
    }

    .metadata-body-row {
      padding: 10px;

      textarea {
        min-height: 150px;
      }
      .key-value-pair-preference {
        margin-right: 0;
      }
    }
  }

  .response-section {
    margin-top: 25px;

    .response-header {
      height: 40px;
      line-height: 40px;
      background-color: $row-bg-color;
      padding-left: 15px;
      padding-right: 15px;

      .title {
        font-weight: bold;
        font-size: 14px;
      }
    }

    .status-title,
    .code {
      display: inline-block;
    }

    .code {
      margin-left: 10px;
    }

    .response-container {
      padding: 15px;
    }
  }
}
